﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using FirebirdSql.EntityFrameworkCore.Firebird.Extensions;
using Microsoft.EntityFrameworkCore;
using System.IO;

namespace MVCClient.Data.DataContext
{
    public class MyContext:DbContext
    {
        public MyContext()
        {

        }
        public MyContext(DbContextOptions<MyContext> option):base(option)
        {

        }
        public DbSet<TestModel> TestModels{ get; set; }

        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            string connectionString = Path.Combine(Directory.GetCurrentDirectory(), "DB", "A.FDB");
            optionsBuilder.UseFirebird(connectionString);
            base.OnConfiguring(optionsBuilder);
        }
    }
}
